﻿@*@model IEnumerable<SDE_FIC.Models.Aluno>*@

@model PagedList.IPagedList<SDE_FIC.Models.Aluno>
@using PagedList.Mvc
<link href="~/Content/PagedList.css" rel="stylesheet" type="text/css" />
@{
    ViewBag.Title = "Aluno";
    Layout = "~/Views/Shared/_Layout_Sistema.cshtml";        
}


<h2>@ViewBag.Title</h2>

<p>
    @Html.ActionLink("Novo Aluno", "Create")
</p>
<table class="table table-bordered table-hover">
    <thead>
    <tr>
        <th>
            Nome do Aluno
        </th>
@*        <th>
            CPF
        </th>*@
        <th>
            Tel. Aluno
        </th>
        <th>
            Data de Nasc.
        </th>
@*        <th>
            Responsável
        </th>
        <th>
            Tel. Responsável
        </th>*@
        <th>Ação</th>
    </tr>

    </thead>
@foreach (var item in Model) {
    <tbody>
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Nome)
        </td>
@*        <td style="text-align:center">
            @Html.DisplayFor(modelItem => item.CPF)
        </td>*@
        <td style="text-align:center">
            @Html.DisplayFor(modelItem => item.Telefone, new {@id="telefone", @maxlength="15"})
        </td>
        <td style="text-align:center">
            @Html.DisplayFor(modelItem => item.DataNascimento)
        </td>
@*        <td>
            @Html.DisplayFor(modelItem => item.Responsavel)
        </td>
        <td style="text-align:center">
            @Html.DisplayFor(modelItem => item.TelefoneResponsavel)
        </td>*@
        <td style="text-align:center;">
            <a href="@Url.Action("Edit", "Aluno", new { id = item.IdAluno })"><img src="~/Content/img/editar.png" alt="Editar"/></a>
            <a href="@Url.Action("Details", "Aluno", new { id=item.IdAluno })"><img src="~/Content/img/detalhes.png" alt="Detalhes"/></a>
            <a href="@Url.Action("Delete", "Aluno", new { id = item.IdAluno })"><img src="~/Content/img/excluir.png" alt="Excluir"/></a>
        </td>
    </tr>
   </tbody>
}

</table>

<div style="font-size:8pt;width:100%;text-align:right;" >
@Html.PagedListPager(Model, page => Url.Action("Index", new {pagina = page}))
</div>